package com.yingside.gui.lovo;

import com.lovo.netCRM.component.LovoButton;
import com.lovo.netCRM.component.LovoDate;
import com.lovo.netCRM.component.LovoLabel;
import com.lovo.netCRM.component.LovoRadioButton;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AuthorPanel extends JPanel {
    private LovoLabel lovoLabel;
    public AuthorPanel() {
        this.setLayout(null);
        lovoLabel = new LovoLabel("作者管理",100,50,this);

        LovoRadioButton lr = new LovoRadioButton("性别",new String[]{"男","女"},100,100,this);
        //String sex = lr.getItem();//得到选中项
        lr.setItem("男");//设置选中项

        LovoDate date = new LovoDate("生日",100,150,this);

        new LovoButton("确定",100,200,this).addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                String dateTxt = date.getText();//得到日历字符串

                System.out.println("dateTxt = " + dateTxt);
            }
        });



        this.setBounds(300, 300, 400, 400);



    }
}
